package com.github.yeecode.mybatisdemo;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserMapper {
    List<User> queryUserBySchoolName(User user);

    List<User> getByName(String  name);

    @Select("select * from user  where id = #{id}")
    User getById(Long  id);

    @Update("update user set name = #{name} where id = #{id}")
    int  updateById(long id,String name);
}
